home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / mail / mh / vmail / vmailtool < prev    next >
Encoding:
Text File  |  1991-04-05  |  38.3 KB  |  1,689 lines

  1. (Message mh:9)
  2. Resent: Mon, 25 Mar 91 10:19:45 PST
  3. Resent: qq11@uxb.liv.ac.uk (Alan Thew)
  4. Resent: Mon, 18 Mar 91 12:23:23 PST
  5. Resent: sow@cad.luth.se (Sven-Ove Westberg)
  6. Resent: cenkl@linus.mitre.org (Mike Cenkl)
  7. Return-Path: jamesp@metolius.WR
  8. To: luj@ecn.purdue.edu (Jun Lu), jkm@ctt.bellcore.COM (James Mcglashan),
  9.         jmvogtle@gamera.cns.syr.edu (John M Vogtle),
  10.         ccw@deakin.OZ.AU (Craig Warren),
  11.         munck@Stars.Reston.Unisys.COM (Bob Munck)
  12. Cc: jamesp@metolius.WR.TEK.COM (James Perkins)
  13. Subject: Vmailtool V1.15
  14. Reply-To: jamesp@metolius.WR.TEK.COM (James T. Perkins)
  15. X-Mailer: Rand MH 6.6 - Vmail 10/87DAS - Vmailtool V1.15 91/03/01
  16. Date: Mon, 11 Mar 91 12:29:39 PST
  17. From: James T Perkins <jamesp@metolius.WR>
  18. --------
  19.  
  20.  
  21. Here's vmailtool version 1.15.  If you need a copy of tooltool, let me
  22. know.  The author of tooltool is Chuck Musciano at Harris Corporation,
  23. but according to the documentation, I have permission to redistribute
  24. tooltool.
  25.  
  26.  ___    ___   ___
  27. |   \  / _ \ / __|  James Perkins, jamesp@metolius.wr.tek.com, (503)629-1149
  28. | |> || |_| |\__ \  Logic Analyzers Division, DAS 9200 Engineering
  29. |___/ |_| |_||___/  Tektronix, MS 92-725, PO Box 4600, Beaverton, OR 97076
  30.  
  31. This package is sold by weight, not by volume.  Some settling of contents may
  32. have occurred during shipping and handling.
  33.  
  34. #! /bin/sh
  35. # This is a shell archive.  Remove anything before this line, then unpack
  36. # it by saving it into a file and typing "sh file".  To overwrite existing
  37. # files, type "sh file -c".  You can also feed this as standard input via
  38. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  39. # will see the following message at the end:
  40. #        "End of archive 1 (of 1)."
  41. # Contents:  MANIFEST Makefile README down left right up vmailicon
  42. #   vmailtool vmailtool.1
  43. # Wrapped by jamesp@metolius on Mon Mar 11 12:18:19 1991
  44. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  45. if test -f MANIFEST -a "${1}" != "-c" ; then 
  46.   echo shar: Will not over-write existing file \"MANIFEST\"
  47. else
  48. echo shar: Extracting \"MANIFEST\" \(414 characters\)
  49. sed "s/^X//" >MANIFEST <<'END_OF_MANIFEST'
  50. X   File Name        Archive #    Description
  51. X-----------------------------------------------------------
  52. X MANIFEST                  1    This shipping list
  53. X Makefile                  1    
  54. X README                    1    
  55. X down                      1    
  56. X left                      1    
  57. X right                     1    
  58. X up                        1    
  59. X vmailicon                 1    
  60. X vmailtool                 1    
  61. X vmailtool.1               1    
  62. END_OF_MANIFEST
  63. if test 414 -ne `wc -c <MANIFEST`; then
  64.     echo shar: \"MANIFEST\" unpacked with wrong size!
  65. fi
  66. # end of overwriting check
  67. fi
  68. if test -f Makefile -a "${1}" != "-c" ; then 
  69.   echo shar: Will not over-write existing file \"Makefile\"
  70. else
  71. echo shar: Extracting \"Makefile\" \(962 characters\)
  72. sed "s/^X//" >Makefile <<'END_OF_Makefile'
  73. X# Vmailtool, version 1.15
  74. X# James T. Perkins 3/91
  75. X
  76. XBINDIR    =    /usr/public/bin
  77. XICONDIR    =    /usr/public/icons
  78. XMANDIR    =    /usr/public/manp/man1
  79. X
  80. XBINS    =    vmailtool vmailicon
  81. XICONS    =    up left right down
  82. XMAN    =    vmailtool.1
  83. XALLSRC    =    README Makefile $(BINS) $(ICONS) $(MAN)
  84. X
  85. XIBINS    =    $(BINDIR)/vmailtool $(BINDIR)/vmailicon
  86. XIICONS    =    $(ICONDIR)/up $(ICONDIR)/left $(ICONDIR)/right $(ICONDIR)/down
  87. XIMAN    =    $(MANDIR)/$(MAN)
  88. X
  89. Xdefault all: $(BINS) $(ICONS) $(MAN)
  90. X
  91. Xclean:
  92. X    rm -f $(ALLSRC)
  93. X
  94. Xmakekit: $(ALLSRC)
  95. X    makekit -m $(ALLSRC)
  96. X
  97. Xinstall: $(IBINS) $(IICONS) $(IMAN)
  98. X
  99. Xuninstall:
  100. X    rm -f $(IBINS) $(IICONS) $(IMAN)
  101. X
  102. X$(ALLSRC):
  103. X    $(CO) $(COFLAGS) $@
  104. X
  105. X$(BINDIR)/vmailtool: vmailtool
  106. X    cp $? $@
  107. X    chmod 755 $@
  108. X
  109. X$(BINDIR)/vmailicon: vmailicon
  110. X    cp $? $@
  111. X    chmod 755 $@
  112. X
  113. X$(ICONDIR)/up: up
  114. X    cp $? $@
  115. X    chmod 644 $@
  116. X
  117. X$(ICONDIR)/right: right
  118. X    cp $? $@
  119. X    chmod 644 $@
  120. X
  121. X$(ICONDIR)/left: left
  122. X    cp $? $@
  123. X    chmod 644 $@
  124. X
  125. X$(ICONDIR)/down: down
  126. X    cp $? $@
  127. X    chmod 644 $@
  128. X
  129. X$(IMAN): $(MAN)
  130. X    cp $? $@
  131. X    chmod 644 $@
  132. END_OF_Makefile
  133. if test 962 -ne `wc -c <Makefile`; then
  134.     echo shar: \"Makefile\" unpacked with wrong size!
  135. fi
  136. # end of overwriting check
  137. fi
  138. if test -f README -a "${1}" != "-c" ; then 
  139.   echo shar: Will not over-write existing file \"README\"
  140. else
  141. echo shar: Extracting \"README\" \(2528 characters\)
  142. sed "s/^X//" >README <<'END_OF_README'
  143. X
  144. X                         VMAILTOOL V1.15
  145. X                        James T. Perkins
  146. X                          11 March 1991
  147. X
  148. XVmailtool is a graphical mail interface for Sun workstations.  It is
  149. Xbased on vmail, the MH mail system, tooltool, and Sunview (or
  150. XOpenWindows).  If you do not have all of these installed on your Sun
  151. Xworkstation, it is useless to you.
  152. X
  153. XVmailtool is a tooltool "wrapper" around the curses-based vmail mail
  154. Xeditor, and provides mouse support and buttons to push for vmail, making
  155. Xthe use of vmail much faster and easier -- you don't have to remember
  156. Xall the keys for the commands.  It provides a neato mail icon with a
  157. Xflag that pops up and down when you recieve mail.  Using the mouse to
  158. Xselect a message for viewing is a lot faster than cursor movement keys,
  159. Xand vmailtool remembers argument strings which you want to pass on to
  160. Xcomp, forw, and repl.
  161. X
  162. XVmailtool V1.4 and later (including V1.15) is based on a modified
  163. Xversion of vmail, which has new commands for rescanning and sorting the
  164. Xmail folder, and for disting and bursting mail items.
  165. X
  166. XVmailtool does have some minor problems, which are listed in the man
  167. Xpage.  Nonetheless, vmailtool has proved a useful and helpful tool.
  168. X
  169. XI offer vmailtool to the user community without any strings attached.
  170. XIf you think of a bugfix or enhancement, please let me know via email.
  171. X
  172. XJames Perkins
  173. Xjamesp@metolius.wr.tek.com
  174. X
  175. X
  176. X                       INSTALLATION NOTES
  177. X
  178. XTo install vmailtool will require a little effort.  First decide on the
  179. Xfollowing directories:
  180. X
  181. X    BINDIR    - where the installed shell scripts will live
  182. X    MANDIR    - where the installed man page will live
  183. X    ICONDIR    - where the installed icons will live
  184. X
  185. XEdit the makefile and change the BINDIR, MANDIR, and ICONDIR parameter
  186. Xdefinitions.
  187. X
  188. XEdit the vmailtool shell script cand change the definitions of:
  189. X
  190. X    VMAILICON    - to reflect BINDIR
  191. X    ICON_UP        - to reflect ICONDIR
  192. X    ICON_DOWN    - to reflect ICONDIR
  193. X    ICON_LEFT    - to reflect ICONDIR
  194. X    ICON_RIGHT    - to reflect ICONDIR
  195. X
  196. XEdit the man page to update the new locations of vmailicon.
  197. X
  198. XEdit vmailicon and make sure that the control characters got through
  199. Xunmolested.  There should be a line that reads:
  200. X
  201. X    echo -n "<ESC>]I${icon}<ESC>\\" >/dev/tty &
  202. X
  203. XWhere <ESC> means an ASCII escape character.
  204. X
  205. XType `make install' to install vmailtool, vmailicon, the icons, and
  206. Xvmailtool.1.  Make sure the permissions on vmailtool and vmailicon are
  207. X755 (read, execute by all, write by owner only), and 644 on the icons
  208. Xand manpage (read by all, write by owner only).
  209. X
  210. XJames
  211. END_OF_README
  212. if test 2528 -ne `wc -c <README`; then
  213.     echo shar: \"README\" unpacked with wrong size!
  214. fi
  215. # end of overwriting check
  216. fi
  217. if test -f down -a "${1}" != "-c" ; then 
  218.   echo shar: Will not over-write existing file \"down\"
  219. else
  220. echo shar: Extracting \"down\" \(193 characters\)
  221. sed "s/^X//" >down <<'END_OF_down'
  222. X/* Format_version=1, Width=16, Height=16, Depth=1, Valid_bits_per_item=16
  223. X */
  224. X    0x0000,0x8001,0x4002,0x6006,0x300C,0x381C,0x1C38,0x1E78,
  225. X    0x0FF0,0x0FF0,0x07E0,0x07E0,0x03C0,0x03C0,0x0180,0x0180
  226. END_OF_down
  227. if test 193 -ne `wc -c <down`; then
  228.     echo shar: \"down\" unpacked with wrong size!
  229. fi
  230. # end of overwriting check
  231. fi
  232. if test -f left -a "${1}" != "-c" ; then 
  233.   echo shar: Will not over-write existing file \"left\"
  234. else
  235. echo shar: Extracting \"left\" \(193 characters\)
  236. sed "s/^X//" >left <<'END_OF_left'
  237. X/* Format_version=1, Width=16, Height=16, Depth=1, Valid_bits_per_item=16
  238. X */
  239. X    0x0002,0x000C,0x0038,0x00F0,0x03E0,0x0FC0,0x3F80,0xFF00,
  240. X    0xFF00,0x3F80,0x0FC0,0x03E0,0x00F0,0x0038,0x000C,0x0002
  241. END_OF_left
  242. if test 193 -ne `wc -c <left`; then
  243.     echo shar: \"left\" unpacked with wrong size!
  244. fi
  245. # end of overwriting check
  246. fi
  247. if test -f right -a "${1}" != "-c" ; then 
  248.   echo shar: Will not over-write existing file \"right\"
  249. else
  250. echo shar: Extracting \"right\" \(193 characters\)
  251. sed "s/^X//" >right <<'END_OF_right'
  252. X/* Format_version=1, Width=16, Height=16, Depth=1, Valid_bits_per_item=16
  253. X */
  254. X    0x4000,0x3000,0x1C00,0x0F00,0x07C0,0x03F0,0x01FC,0x00FF,
  255. X    0x00FF,0x01FC,0x03F0,0x07C0,0x0F00,0x1C00,0x3000,0x4000
  256. END_OF_right
  257. if test 193 -ne `wc -c <right`; then
  258.     echo shar: \"right\" unpacked with wrong size!
  259. fi
  260. # end of overwriting check
  261. fi
  262. if test -f up -a "${1}" != "-c" ; then 
  263.   echo shar: Will not over-write existing file \"up\"
  264. else
  265. echo shar: Extracting \"up\" \(193 characters\)
  266. sed "s/^X//" >up <<'END_OF_up'
  267. X/* Format_version=1, Width=16, Height=16, Depth=1, Valid_bits_per_item=16
  268. X */
  269. X    0x0180,0x0180,0x03C0,0x03C0,0x07E0,0x07E0,0x0FF0,0x0FF0,
  270. X    0x1E78,0x1C38,0x381C,0x300C,0x6006,0x4002,0x8001,0x0000
  271. END_OF_up
  272. if test 193 -ne `wc -c <up`; then
  273.     echo shar: \"up\" unpacked with wrong size!
  274. fi
  275. # end of overwriting check
  276. fi
  277. if test -f vmailicon -a "${1}" != "-c" ; then 
  278.   echo shar: Will not over-write existing file \"vmailicon\"
  279. else
  280. echo shar: Extracting \"vmailicon\" \(1270 characters\)
  281. sed "s/^X//" >vmailicon <<'END_OF_vmailicon'
  282. X:
  283. X# NAME
  284. X#    vmailicon - set the icon for /dev/tty's window
  285. X#
  286. X# SYNOPSIS
  287. X#    vmailicon iconfile
  288. X#
  289. X# DESCRIPTION
  290. X#    This is the tool that vmailtool uses to raise or lower the icon
  291. X#    flag.  This tool exists because the method used to set the icon
  292. X#    (echoing a shelltool "terminal" command string to /dev/tty)
  293. X#    sometimes blocks forever due to a race condition.  This tool can
  294. X#    keep trying to set the icon until it finally succeeds, and it
  295. X#    can do it in the background so vmailtool doesn't hang up.
  296. X#
  297. X# AUTHOR
  298. X#    James Perkins 6 Feb 1991
  299. X
  300. Xcase $# in
  301. X    1) icon=$1;;
  302. X    *) echo "usage: $0 iconfile" >&2; exit 1;;
  303. Xesac
  304. X
  305. Xif [ ! -f $icon ]
  306. Xthen
  307. X    echo "usage: $0 iconfile" >&2
  308. X    exit 1
  309. Xfi
  310. X
  311. X# run echo and then kill it.  If the echo is finished, the kill will return a
  312. X# nonzero exit code.  If the kill succeeds, the echo wasn't finished, so
  313. X# loop back and try again, ad nauseum.  Give up after maxtries tries.
  314. X
  315. Xexport iconfile
  316. X(
  317. X    trynum=1
  318. X    maxtries=5
  319. X    status=0
  320. X    while [ $status -eq 0 -a $trynum -le $maxtries ]
  321. X    do
  322. X    echo -n "]I${icon}\\" >/dev/tty &
  323. X    echopid=$!
  324. X    trynum=`expr $trynum + 1`
  325. X    sleep 1
  326. X    kill -9 $! > /dev/null 2>&1
  327. X    status=$?
  328. X    done
  329. X
  330. X    if [ $trynum -gt $maxtries ]
  331. X    then
  332. X    echo "vmailicon: icon not set after $trynum tries" >&2
  333. X    fi
  334. X) &
  335. END_OF_vmailicon
  336. echo shar: 2 control characters may be missing from \"vmailicon\"
  337. if test 1270 -ne `wc -c <vmailicon`; then
  338.     echo shar: \"vmailicon\" unpacked with wrong size!
  339. fi
  340. chmod +x vmailicon
  341. # end of overwriting check
  342. fi
  343. if test -f vmailtool -a "${1}" != "-c" ; then 
  344.   echo shar: Will not over-write existing file \"vmailtool\"
  345. else
  346. echo shar: Extracting \"vmailtool\" \(16027 characters\)
  347. sed "s/^X//" >vmailtool <<'END_OF_vmailtool'
  348. X:
  349. X# vmailtool
  350. X#
  351. X# James T. Perkins
  352. X#
  353. X# $Id: vmailtool,v 1.15 91/03/01 14:03:01 jamesp Exp $
  354. X
  355. XTMP=/tmp/vmailtool.$$
  356. X
  357. XNOMAILICON="${NOMAILICON:-/usr/include/images/nomail.icon}"
  358. XMAILICON="${MAILICON:-/usr/include/images/mail.icon}"
  359. XBOLD_FONT="${BOLD_FONT:-/usr/lib/fonts/fixedwidthfonts/screen.b.14}"
  360. XREVISION="V`set $Revision: 1.15 $ ; echo \$2`"
  361. XDATE="`set $Date: 91/03/01 14:03:01 $ ; echo \$2`"
  362. X
  363. Xif stty 2>&1 >/dev/tty | grep -s tostop
  364. Xthen
  365. X    echo "vmailtool: vmailtool and 'stty tostop' are incompatible.  See the man page." >&2
  366. X    exit 1
  367. Xfi
  368. X
  369. Xtrap 'status=$?; rm $TMP; exit $status' 0 1 2 15
  370. X
  371. Xcat >$TMP <<END-OF-TOOLTOOL-SCRIPT
  372. X/*
  373. X * vmailtool $REVISION tooltool file
  374. X * James Perkins $DATE
  375. X */
  376. X
  377. X#define APPLICATION    "vmail"
  378. X#define VMAILICON    "/usr/public/bin/vmailicon"
  379. X#define ICON_MAIL    "$MAILICON"
  380. X#define ICON_NOMAIL    "$NOMAILICON"
  381. X#define MAIL_LABEL    '$MAILICON'
  382. X#define NOMAIL_LABEL    '$NOMAILICON'
  383. X#define ICON_UP        '/usr/public/icons/up'
  384. X#define ICON_DOWN    '/usr/public/icons/down'
  385. X#define ICON_LEFT    '/usr/public/icons/left'
  386. X#define ICON_RIGHT    '/usr/public/icons/right'
  387. X#define LABEL        "Vmail/MH Tool - $REVISION - $DATE - JTP"
  388. X#define ROW_SIZE    34
  389. X#define COL_SIZE    80
  390. X#define BOLD_FONT    "$BOLD_FONT"
  391. X
  392. X/*
  393. X * icon_flag_up/icon_flag_down - these strings are echoed to the tty when mail
  394. X * arrives or is incorporated.  They cause the tooltool icon to change to
  395. X * indicate arrival of mail, or no mail.
  396. X */
  397. X
  398. X#define    icon_flag_up    format("%s %s", VMAILICON, ICON_MAIL)
  399. X#define    icon_flag_down    format("%s %s", VMAILICON, ICON_NOMAIL)
  400. X
  401. X/*
  402. X * types of dialog boxes.  We only have one dialog box, and it switch-hits
  403. X * between each kind of dialog box.  This is necessary becuase tooltool
  404. X * eats up one extra window for each dialog box -- if there were a dialog
  405. X * box for each one of these, tooltool would eat up a lot of windows.
  406. X */
  407. X
  408. X#define REFILE        0
  409. X#define COMP        1
  410. X#define REPL        2
  411. X#define FORW        3
  412. X#define SEARCH        4
  413. X#define NEW_FOLDER    5
  414. X#define PIPE        6
  415. X#define DIST        7
  416. X#define BURST        8
  417. X#define SORT        9
  418. X
  419. X/*
  420. X * define overall application
  421. X */
  422. X
  423. Xapplication APPLICATION
  424. Xicon ICON_NOMAIL
  425. Xlabel LABEL
  426. Xsize ROW_SIZE by COL_SIZE characters
  427. X
  428. X/*
  429. X * Do the following when we start up
  430. X */
  431. Xinitialize {
  432. X    /*
  433. X     * initialize dialog box
  434. X     */
  435. X
  436. X    dialog_box_first_time = 1;
  437. X
  438. X    /*
  439. X     * get mpath (path of system maildrop) from MAILPATH, MAIL, or USER
  440. X     * environment variables.
  441. X     */
  442. X
  443. X    if (length(mpath = getenv("MAILPATH")) > 0) {
  444. X        endpath = index(mpath, "?");
  445. X        mpath = substr(mpath, 1, (endpath - 1));
  446. X    }
  447. X    else if (length(mpath = getenv("MAIL")) > 0) {
  448. X        ;
  449. X    }
  450. X    else {
  451. X        user = getenv("USER");
  452. X        mpath = format("/usr/spool/mail/%s", user);
  453. X    }
  454. X
  455. X    /*
  456. X     * get NEWMAILCMD environment variable.  The shell command in
  457. X     * newmailcmd is executed every time new mail arrives.
  458. X     */
  459. X
  460. X    newmailcmd = getenv("NEWMAILCMD");
  461. X    lastsize = 0;
  462. X    cursize = 0;
  463. X
  464. X    /*
  465. X     * Pop up flag (both the icon and the mail label) if there's mail
  466. X     */
  467. X
  468. X    remove mail_label;
  469. X    if (exists(mpath)) {
  470. X        st = stat(mpath);
  471. X        cursize = st["size"];
  472. X        if (cursize > lastsize) {
  473. X        system(icon_flag_up);
  474. X        remove nomail_label;
  475. X        display mail_label;
  476. X        }
  477. X    }
  478. X    lastsize = cursize;
  479. X
  480. X    /*
  481. X     * Set up new mail test timer, based on MAILCHECK environment variable.
  482. X     * timeout will never exceed 60 seconds.
  483. X     */
  484. X    
  485. X    if ((interval = getenv("MAILCHECK")) < 60) {
  486. X        interval = 60;
  487. X    }
  488. X}
  489. X
  490. X
  491. X/*
  492. X * Do the following when the window is opened
  493. X */
  494. X
  495. Xopen {}
  496. X
  497. X/*
  498. X * Do the following when the window is closed
  499. X */
  500. X
  501. Xclose {}
  502. X
  503. X/*
  504. X * Do the following asychronously, whenever the "interval" timer times out.
  505. X */
  506. X
  507. Xtimer {
  508. X    /*
  509. X     * Pop up flag if there's mail (both icon and mail label)
  510. X     */
  511. X
  512. X    if (exists(mpath)) {
  513. X        st = stat(mpath);
  514. X        cursize = st["size"];
  515. X        if (cursize > lastsize) {
  516. X        system(icon_flag_up);
  517. X        remove nomail_label;
  518. X        display mail_label;
  519. X        if (length(newmailcmd) > 0) {
  520. X            system(newmailcmd);
  521. X        }
  522. X        }
  523. X        else {
  524. X        if (cursize == 0 && lastsize != 0) {
  525. X        remove mail_label;
  526. X        display nomail_label;
  527. X        }
  528. X        }
  529. X    }
  530. X    lastsize = cursize;
  531. X}
  532. X
  533. X/*
  534. X * Define all buttons and menus for the application
  535. X */
  536. X
  537. Xgadgets
  538. X    /*
  539. X     * Button labels are right justified and not adjusted.
  540. X     */
  541. X
  542. X    right
  543. X    ragged
  544. X
  545. X    /*
  546. X     * Gadgets at default places
  547. X     */
  548. X
  549. X    button mail_label    /* Copy of tooltool icon */
  550. X        at 5 5
  551. X        normal    MAIL_LABEL {
  552. X            close;
  553. X        }
  554. X        control    "quit"    {
  555. X            exit;
  556. X        }
  557. X    end_button
  558. X    button            /* incorporate mail */
  559. X        normal    "inc"    {
  560. X            remove mail_label;
  561. X            display nomail_label;
  562. X            system(icon_flag_down);
  563. X            send "i";
  564. X        }
  565. X        shift    "inc show"    {
  566. X            remove mail_label;
  567. X            display nomail_label;
  568. X            system(icon_flag_down);
  569. X            send "i ";
  570. X        }
  571. X    end_button
  572. X    label            /* blank lines to leave room for arrows */
  573. X        ""
  574. X    end_label
  575. X    label
  576. X        ""
  577. X    end_label
  578. X    label
  579. X        ""
  580. X    end_label
  581. X    label
  582. X        ""
  583. X    end_label
  584. X    label
  585. X        "-MESSAGE-" : BOLD_FONT
  586. X    end_label
  587. X    button            /* show current message */
  588. X        normal    "show"    {
  589. X            send " ";
  590. X        }
  591. X        shift    "print"    {
  592. X            printer = getenv("PRINTER");
  593. X            if (length(printer) > 0) {
  594. X                printer = format(" -P%s", printer);
  595. X            }
  596. X            send(format("|(echo Printing...; lpr%s)\n ", printer));
  597. X        }
  598. X        control    "pipe"    {
  599. X            dialog_type = PIPE;
  600. X            popup dialog_box;
  601. X        }
  602. X    end_button
  603. X    button            /* delete current message */
  604. X        normal    "delete" {
  605. X            send "d";
  606. X        }
  607. X        shift    "undo delete" {
  608. X            send "u";
  609. X        }
  610. X    end_button
  611. X    button            /* refile current message */
  612. X        normal    "refile" {
  613. X            dialog_type = REFILE;
  614. X            popup dialog_box;
  615. X        }
  616. X        shift    "again"    {
  617. X            if (length(refile_cmd) > 0) {
  618. X                send(refile_cmd);
  619. X            }
  620. X            else {
  621. X                dialog_type = REFILE;
  622. X                popup dialog_box;
  623. X            }
  624. X        }
  625. X        control    "to prev folder"    {
  626. X            send "R";
  627. X        }
  628. X    end_button
  629. X    label
  630. X        ""
  631. X    end_label
  632. X    button            /* compose new message */
  633. X        normal    "comp"    {
  634. X            send "c\n";
  635. X        }
  636. X        shift    "comp..."    {
  637. X            dialog_type = COMP;
  638. X            popup dialog_box;
  639. X        }
  640. X    end_button
  641. X    button            /* reply to current message */
  642. X        normal    "repl"    {
  643. X            send "a\n";
  644. X        }
  645. X        shift    "repl..."    {
  646. X            dialog_type = REPL;
  647. X            popup dialog_box;
  648. X        }
  649. X    end_button
  650. X    button            /* forward current message */
  651. X        normal    "forw"    {
  652. X            send "f\n";
  653. X        }
  654. X        shift    "forw..."    {
  655. X            dialog_type = FORW;
  656. X            popup dialog_box;
  657. X        }
  658. X    end_button
  659. X    menu "misc"
  660. X        "rescan" {
  661. X            send "^R";
  662. X        }
  663. X        "edit" {
  664. X            send "e";
  665. X        }
  666. X        "burst" {
  667. X            send "b\n";
  668. X        }
  669. X        "burst..." {
  670. X            dialog_type = BURST;
  671. X            popup dialog_box;
  672. X        }
  673. X        "dist" {
  674. X            send "t\n";
  675. X        }
  676. X        "dist..." {
  677. X            dialog_type = DIST;
  678. X            popup dialog_box;
  679. X        }
  680. X    end_menu
  681. X    label
  682. X        ""
  683. X    end_label
  684. X    label
  685. X        "-FOLDER-" : BOLD_FONT
  686. X    end_label
  687. X    button            /* search folder for subject line */
  688. X        normal    "search"    {
  689. X            if (length(search_cmd) > 0) {
  690. X                send(search_cmd);
  691. X            }
  692. X            else {
  693. X                beep;
  694. X            }
  695. X        }
  696. X        shift    "forward..."    {
  697. X            search_dir = "/";
  698. X            dialog_type = SEARCH;
  699. X            popup dialog_box;
  700. X        }
  701. X        control    "backward..."    {
  702. X            search_dir = "?";
  703. X            dialog_type = SEARCH;
  704. X            popup dialog_box;
  705. X        }
  706. X    end_button
  707. X    button            /* go to new folder */
  708. X        normal    "new fold"    {
  709. X                dialog_type = NEW_FOLDER;
  710. X                popup dialog_box;
  711. X            }
  712. X        shift    "alternate"    {
  713. X                if (length(new_folder_cmd) > 0) {
  714. X                    send "G";
  715. X                }
  716. X                else {
  717. X                    dialog_type = NEW_FOLDER;
  718. X                    popup dialog_box;
  719. X                }
  720. X            }
  721. X    end_button
  722. X    Menu    "misc"        /* misc folder commands */
  723. X        "List All" {
  724. X            send "F";
  725. X        }
  726. X        "Pack"    {
  727. X            send "z";
  728. X        }
  729. X        "Sort"    {
  730. X            send "S\n";
  731. X        }
  732. X        "Sort..."    {
  733. X            dialog_type = SORT;
  734. X            popup dialog_box;
  735. X        }
  736. X        "Inactivate"    {
  737. X            send "v";
  738. X        }
  739. X    end_menu
  740. X
  741. X    /*
  742. X     * Gadgets at particular places
  743. X     */
  744. X
  745. X    button nomail_label        /* copy of tooltool icon */
  746. X        at 5 5
  747. X        normal    NOMAIL_LABEL {
  748. X            close;
  749. X        }
  750. X        control    "quit"    {
  751. X            exit;
  752. X        }
  753. X    end_button
  754. X    button                /* make prev message current */
  755. X        at 30 110
  756. X        normal    ICON_UP    {
  757. X            send "k";
  758. X        }
  759. X        shift    "home"    {
  760. X            send "H";
  761. X        }
  762. X    end_button
  763. X    button                /* go to prev page of messages */
  764. X        at 10 130
  765. X        normal    ICON_LEFT    {
  766. X            send "\b";
  767. X        }
  768. X        shift    "prev folder"    {
  769. X            send "p";
  770. X        }
  771. X    end_button
  772. X    button                /* go to next page of messages */
  773. X        at 50 130
  774. X        normal    ICON_RIGHT    {
  775. X            send "\r";
  776. X        }
  777. X        shift    "next folder"    {
  778. X            send "n";
  779. X        }
  780. X    end_button
  781. X    button                /* make next message current */
  782. X        at 30 150
  783. X        normal    ICON_DOWN    {
  784. X            send "j";
  785. X        }
  786. X        shift    "last line"    {
  787. X            send "L";
  788. X        }
  789. X    end_button
  790. Xend_gadgets
  791. X
  792. X/*
  793. X * Here's the dialog box that does everything.
  794. X * The first time it is opened, it removes everything in it except for
  795. X * the "done" and "cancel" buttons.
  796. X * Then, any time it is opened it adds the fields it needs, and when it
  797. X * is closed it removes them.
  798. X */
  799. X
  800. Xdialog dialog_box
  801. X    size 24 by 43 characters
  802. X    open {
  803. X        if (dialog_box_first_time == 1) {
  804. X            dialog_box_first_time = 0;
  805. X            remove refile_label;
  806. X            remove refile_folder;
  807. X            remove comp_label;
  808. X            remove comp_opts;
  809. X            remove forw_label;
  810. X            remove forw_opts;
  811. X            remove repl_label;
  812. X            remove repl_opts;
  813. X            remove search_label;
  814. X            remove search_regex;
  815. X            remove new_folder_label;
  816. X            remove new_folder;
  817. X            remove pipe_label;
  818. X            remove pipe_cmd;
  819. X            remove burst_label;
  820. X            remove burst_opts;
  821. X            remove dist_label;
  822. X            remove dist_opts;
  823. X            remove sort_label;
  824. X            remove sort_opts;
  825. X        }
  826. X        if (dialog_type == REFILE) {
  827. X            refile_folder = last_refile_folder;
  828. X            display refile_label;
  829. X            display refile_folder;
  830. X        }
  831. X        else if (dialog_type == COMP) {
  832. X            comp_opts = last_comp_opts;
  833. X            display comp_label;
  834. X            display comp_opts;
  835. X        }
  836. X        else if (dialog_type == FORW) {
  837. X            forw_opts = last_forw_opts;
  838. X            display forw_label;
  839. X            display forw_opts;
  840. X        }
  841. X        else if (dialog_type == REPL) {
  842. X            repl_opts = last_repl_opts;
  843. X            display repl_label;
  844. X            display repl_opts;
  845. X        }
  846. X        else if (dialog_type == SEARCH) {
  847. X            search_regex = last_search_regex;
  848. X            display search_label;
  849. X            display search_regex;
  850. X        }
  851. X        else if (dialog_type == NEW_FOLDER) {
  852. X            new_folder = last_new_folder;
  853. X            display new_folder_label;
  854. X            display new_folder;
  855. X        }
  856. X        else if (dialog_type == PIPE) {
  857. X            pipe_cmd = last_pipe_cmd;
  858. X            display pipe_label;
  859. X            display pipe_cmd;
  860. X        }
  861. X        else if (dialog_type == BURST) {
  862. X            burst_opts = last_burst_opts;
  863. X            display burst_label;
  864. X            display burst_opts;
  865. X        }
  866. X        else if (dialog_type == DIST) {
  867. X            dist_opts = last_dist_opts;
  868. X            display dist_label;
  869. X            display dist_opts;
  870. X        }
  871. X        else if (dialog_type == SORT) {
  872. X            sort_opts = last_sort_opts;
  873. X            display sort_label;
  874. X            display sort_opts;
  875. X        }
  876. X    }
  877. X    close {
  878. X        if (dialog_type == REFILE) {
  879. X            remove refile_label;
  880. X            remove refile_folder;
  881. X        }
  882. X        else if (dialog_type == COMP) {
  883. X            remove comp_label;
  884. X            remove comp_opts;
  885. X        }
  886. X        else if (dialog_type == FORW) {
  887. X            remove forw_label;
  888. X            remove forw_opts;
  889. X        }
  890. X        else if (dialog_type == REPL) {
  891. X            remove repl_label;
  892. X            remove repl_opts;
  893. X        }
  894. X        else if (dialog_type == SEARCH) {
  895. X            remove search_label;
  896. X            remove search_regex;
  897. X        }
  898. X        else if (dialog_type == NEW_FOLDER) {
  899. X            remove new_folder_label;
  900. X            remove new_folder;
  901. X        }
  902. X        else if (dialog_type == PIPE) {
  903. X            remove pipe_label;
  904. X            remove pipe_cmd;
  905. X        }
  906. X        else if (dialog_type == BURST) {
  907. X            remove burst_label;
  908. X            remove burst_opts;
  909. X        }
  910. X        else if (dialog_type == DIST) {
  911. X            remove dist_label;
  912. X            remove dist_opts;
  913. X        }
  914. X        else if (dialog_type == SORT) {
  915. X            remove sort_label;
  916. X            remove sort_opts;
  917. X        }
  918. X    }
  919. X    gadgets
  920. X        label refile_label
  921. X            at 5 5
  922. X            "Choose folder to refile to"
  923. X        end_label
  924. X        button
  925. X            normal    "OK" {
  926. X                if (dialog_type == REFILE) {
  927. X                    refile_cmd = format("r%s\n", refile_folder);
  928. X                    send(refile_cmd);
  929. X                    last_refile_folder = refile_folder;
  930. X                }
  931. X                else if (dialog_type == COMP) {
  932. X                    comp_cmd = format("c%s\n", comp_opts);
  933. X                    send(comp_cmd);
  934. X                    last_comp_opts = comp_opts;
  935. X                }
  936. X                else if (dialog_type == FORW) {
  937. X                    forw_cmd = format("f%s\n", forw_opts);
  938. X                    send(forw_cmd);
  939. X                    last_forw_opts = forw_opts;
  940. X                }
  941. X                else if (dialog_type == REPL) {
  942. X                    repl_cmd = format("a%s\n", forw_opts);
  943. X                    send(repl_cmd);
  944. X                    last_repl_opts = repl_opts;
  945. X                }
  946. X                else if (dialog_type == SEARCH) {
  947. X                    search_cmd = format("%s%s\n",
  948. X                        search_dir, search_regex);
  949. X                    send(search_cmd);
  950. X                    last_search_regex = search_regex;
  951. X                }
  952. X                else if (dialog_type == NEW_FOLDER) {
  953. X                    new_folder_cmd = format("g%s\n",
  954. X                        new_folder);
  955. X                    send(new_folder_cmd);
  956. X                    last_new_folder = new_folder;
  957. X                }
  958. X                else if (dialog_type == PIPE) {
  959. X                    pipe_cmd_cmd = format("|%s\n",
  960. X                        pipe_cmd);
  961. X                    send(pipe_cmd_cmd);
  962. X                    last_pipe_cmd = pipe_cmd;
  963. X                }
  964. X                else if (dialog_type == BURST) {
  965. X                    burst_cmd = format("b%s\n", burst_opts);
  966. X                    send(burst_cmd);
  967. X                    last_burst_opts = burst_opts;
  968. X                }
  969. X                else if (dialog_type == DIST) {
  970. X                    dist_cmd = format("t%s\n", dist_opts);
  971. X                    send(dist_cmd);
  972. X                    last_dist_opts = dist_opts;
  973. X                }
  974. X                else if (dialog_type == SORT) {
  975. X                    sort_cmd = format("S%s\n", sort_opts);
  976. X                    send(sort_cmd);
  977. X                    last_sort_opts = sort_opts;
  978. X                }
  979. X                remove dialog_box;
  980. X            }
  981. X        end_button
  982. X        text refile_folder
  983. X            display 20
  984. X            completion    "\n\e"
  985. X            label    "Folder:"
  986. X            action    {
  987. X                refile_cmd = format("r%s\n", refile_folder);
  988. X                send(refile_cmd);
  989. X                last_refile_folder = refile_folder;
  990. X                remove dialog_box;
  991. X            }
  992. X        end_text
  993. X        button
  994. X            normal    "Cancel"    {
  995. X                remove dialog_box;
  996. X            }
  997. X        end_button
  998. X        label comp_label
  999. X            at 5 5
  1000. X            "Choose arguments for comp"
  1001. X        end_label
  1002. X        label forw_label
  1003. X            at 5 5
  1004. X            "Choose arguments for forw"
  1005. X        end_label
  1006. X        label repl_label
  1007. X            at 5 5
  1008. X            "Choose arguments for repl"
  1009. X        end_label
  1010. X        label search_label
  1011. X            at 5 5
  1012. X            "Subject line search"
  1013. X        end_label
  1014. X        label new_folder_label
  1015. X            at 5 5
  1016. X            "Choose new folder"
  1017. X        end_label
  1018. X        label pipe_label
  1019. X            at 5 5
  1020. X            "Pipe message to command"
  1021. X        end_label
  1022. X        label burst_label
  1023. X            at 5 5
  1024. X            "Choose arguments for burst"
  1025. X        end_label
  1026. X        label dist_label
  1027. X            at 5 5
  1028. X            "Choose arguments for dist"
  1029. X        end_label
  1030. X        label sort_label
  1031. X            at 5 5
  1032. X            "Choose arguments for sortm"
  1033. X        end_label
  1034. X        text comp_opts
  1035. X            at 5 30
  1036. X            display 20
  1037. X            completion    "\n\e"
  1038. X            label    "Arguments:"
  1039. X            action    {
  1040. X                comp_cmd = format("c%s\n", comp_opts);
  1041. X                send(comp_cmd);
  1042. X                last_comp_opts = comp_opts;
  1043. X                remove dialog_box;
  1044. X            }
  1045. X        end_text
  1046. X        text forw_opts
  1047. X            at 5 30
  1048. X            display 20
  1049. X            completion    "\n\e"
  1050. X            label    "Arguments:"
  1051. X            action    {
  1052. X                forw_cmd = format("f%s\n", forw_opts);
  1053. X                send(forw_cmd);
  1054. X                last_forw_opts = forw_opts;
  1055. X                remove dialog_box;
  1056. X            }
  1057. X        end_text
  1058. X        text repl_opts
  1059. X            at 5 30
  1060. X            display 20
  1061. X            completion    "\n\e"
  1062. X            label    "Arguments:"
  1063. X            action    {
  1064. X                repl_cmd = format("a%s\n", repl_opts);
  1065. X                send(repl_cmd);
  1066. X                last_repl_opts = repl_opts;
  1067. X                remove dialog_box;
  1068. X            }
  1069. X        end_text
  1070. X        text search_regex
  1071. X            at 5 30
  1072. X            display 20
  1073. X            completion    "\n\e"
  1074. X            label    "Expression:"
  1075. X            action    {
  1076. X                search_cmd = format("%s%s\n", search_dir,
  1077. X                    search_regex);
  1078. X                send(search_cmd);
  1079. X                last_search_regex = search_regex;
  1080. X                remove dialog_box;
  1081. X            }
  1082. X        end_text
  1083. X        text new_folder
  1084. X            at 5 30
  1085. X            display 20
  1086. X            completion    "\n\e"
  1087. X            label    "Folder:"
  1088. X            action    {
  1089. X                new_folder_cmd = format("g%s\n", new_folder);
  1090. X                send(new_folder_cmd);
  1091. X                last_new_folder = new_folder;
  1092. X                remove dialog_box;
  1093. X            }
  1094. X        end_text
  1095. X        text pipe_cmd
  1096. X            at 5 30
  1097. X            display 20
  1098. X            completion    "\n\e"
  1099. X            label    "Command:"
  1100. X            action    {
  1101. X                pipe_cmd_cmd = format("|%s\n", pipe_cmd);
  1102. X                send(pipe_cmd_cmd);
  1103. X                last_pipe_cmd = pipe_cmd;
  1104. X                remove dialog_box;
  1105. X            }
  1106. X        end_text
  1107. X        text burst_opts
  1108. X            at 5 30
  1109. X            display 20
  1110. X            completion    "\n\e"
  1111. X            label    "Arguments:"
  1112. X            action    {
  1113. X                burst_cmd = format("b%s\n", burst_opts);
  1114. X                send(burst_cmd);
  1115. X                last_burst_opts = burst_opts;
  1116. X                remove dialog_box;
  1117. X            }
  1118. X        end_text
  1119. X        text dist_opts
  1120. X            at 5 30
  1121. X            display 20
  1122. X            completion    "\n\e"
  1123. X            label    "Arguments:"
  1124. X            action    {
  1125. X                dist_cmd = format("t%s\n", dist_opts);
  1126. X                send(dist_cmd);
  1127. X                last_dist_opts = dist_opts;
  1128. X                remove dialog_box;
  1129. X            }
  1130. X        end_text
  1131. X        text sort_opts
  1132. X            at 5 30
  1133. X            display 20
  1134. X            completion    "\n\e"
  1135. X            label    "Arguments:"
  1136. X            action    {
  1137. X                sort_cmd = format("S%s\n", sort_opts);
  1138. X                send(sort_cmd);
  1139. X                last_sort_opts = sort_opts;
  1140. X                remove dialog_box;
  1141. X            }
  1142. X        end_text
  1143. X    end_gadgets
  1144. Xend_dialog
  1145. X
  1146. X/*
  1147. X * Move cursor to message that the mouse points to.
  1148. X */
  1149. X
  1150. Xmouse
  1151. X    base 0 characters
  1152. X    button left
  1153. X        normal    {
  1154. X            scanline = mouse_y - 1;
  1155. X            send "H";
  1156. X            while (scanline-- > 1) {
  1157. X                send "j";
  1158. X            }
  1159. X        }
  1160. X        shift    {
  1161. X            scanline = mouse_y - 1;
  1162. X            send "H";
  1163. X            while (scanline-- > 1) {
  1164. X                send "j";
  1165. X            }
  1166. X            send " ";
  1167. X        }
  1168. X    end_button
  1169. Xend_mouse
  1170. XEND-OF-TOOLTOOL-SCRIPT
  1171. X
  1172. Xexec tooltool -f $TMP "$@"
  1173. END_OF_vmailtool
  1174. if test 16027 -ne `wc -c <vmailtool`; then
  1175.     echo shar: \"vmailtool\" unpacked with wrong size!
  1176. fi
  1177. chmod +x vmailtool
  1178. # end of overwriting check
  1179. fi
  1180. if test -f vmailtool.1 -a "${1}" != "-c" ; then 
  1181.   echo shar: Will not over-write existing file \"vmailtool.1\"
  1182. else
  1183. echo shar: Extracting \"vmailtool.1\" \(9888 characters\)
  1184. sed "s/^X//" >vmailtool.1 <<'END_OF_vmailtool.1'
  1185. X.TH VMAILTOOL 1 "" "$Date: 91/03/08 13:27:32 $" "LAD"
  1186. X.\" Vmailtool, version 1.4
  1187. X.\" James T. Perkins 4/90
  1188. X.SH NAME
  1189. Xvmailtool
  1190. X-
  1191. Xrun vmail in a sunview window
  1192. X.SH SYNOPSIS
  1193. X.B vmailtool
  1194. X[
  1195. Xvmail-options
  1196. X]
  1197. X.\" UCB, in its infinite wisdom, left much
  1198. X.\" brilliance out of the man macros.  I attempt to
  1199. X.\" make up for bits of it here.
  1200. X.\" R returns you to Roman typeface (since there
  1201. X.\" is no correct way to undo .B or .I)
  1202. X.de R
  1203. X.if n .ul 0
  1204. X.ft 1
  1205. X..
  1206. X.\" DS starts an indented display
  1207. X.\" (starts with a blank line)
  1208. X.de DS
  1209. X.sp
  1210. X.RS
  1211. X.nf
  1212. X..
  1213. X.\" DE ends an indented display
  1214. X.de DE
  1215. X.fi
  1216. X.RE
  1217. X..
  1218. X.\" SP/EP is a replacement for the IP function,
  1219. X.\" which doesn't fold the tag if it's too long to
  1220. X.\" fit on one line.
  1221. X.de SP
  1222. X.if \\n(sp .RE
  1223. X.nr sp 1
  1224. X.LP
  1225. X\\$1
  1226. X.br
  1227. X.RS
  1228. X..
  1229. X.de EP
  1230. X.nr sp 0
  1231. X.RE
  1232. X..
  1233. X.SH DESCRIPTION
  1234. X.I Vmailtool
  1235. Xinvokes the MH-based
  1236. X.I vmail
  1237. Xmail editor in a sunview
  1238. X.I tooltool
  1239. Xwindow.
  1240. XIt provides buttons for incorporating,
  1241. Xshowing,
  1242. Xprinting,
  1243. Xpiping to a command,
  1244. Xbursting,
  1245. Xdeleting,
  1246. Xrefiling,
  1247. Xforwarding,
  1248. Xdisting
  1249. X(resending),
  1250. Xand replying to mail.
  1251. XIt provides functions for searching,
  1252. Xmoving to,
  1253. Xlisting,
  1254. Xpacking,
  1255. Xsorting,
  1256. Xand inactivating folders.
  1257. XIt has the capability to resync the mail item listing with
  1258. Xwhat's really in the mh mail folder.
  1259. XIt even provides an animated mail icon with the flag that
  1260. Xpops up and down based on whether you have mail or not.
  1261. X.LP
  1262. X.I Mouse
  1263. X.LP
  1264. XIf you are looking at a scan listing,
  1265. Xyou can click the left mouse button on a message and the
  1266. Xcursor will move to that message.
  1267. X.LP
  1268. XIf you shift-click the left mouse button,
  1269. Xit will move to and
  1270. X.B show
  1271. Xthe message.
  1272. X.LP
  1273. XIf you control-click the left mouse button,
  1274. Xthe mouse will do the familiar text selection action.
  1275. X.LP
  1276. X.I "Mailbox icon"
  1277. X.LP
  1278. XIf you click on the mailbox icon,
  1279. Xthe window will close.
  1280. XIf you shift-click,
  1281. X.I vmailtool
  1282. Xexits.
  1283. X.LP
  1284. X.I "Inc button"
  1285. X.LP
  1286. XIf you click on the inc button,
  1287. Xmail will be incorporated.
  1288. XIf you shift-click,
  1289. Xmail will be inc'ed and the first message will be show'ed.
  1290. X.LP
  1291. X.I "Arrows"
  1292. X.LP
  1293. XIf you wish to go to the next/previous message,
  1294. Xclick on the up/down arrows.
  1295. X.LP
  1296. XIf you wish to go to the top/bottom of the page,
  1297. Xshift-click on the up/down arrows.
  1298. X.LP
  1299. XIf you wish to move forward/backward pages of active
  1300. Xmessages,
  1301. Xclick on the left and right arrows.
  1302. X.LP
  1303. XIf you wish to move forward/backward to the next/previous
  1304. Xfolder,
  1305. Xshift-click on the right and left arrows.
  1306. X.LP
  1307. X.I "Show button"
  1308. X.LP
  1309. XIf you click on the show button,
  1310. Xit show's the mail.
  1311. XFurther clicks advance the pager by one page.
  1312. XIf you shift-click,
  1313. Xthe mail is printed on your favorite printer
  1314. X(default is lpr).
  1315. XIf you control-click,
  1316. Xyou are asked to specify a command to pipe the mail to.
  1317. X.LP
  1318. X.I "Delete button"
  1319. X.LP
  1320. XA click deletes the current message.
  1321. XA shift-click will restore the last message deleted.
  1322. X.LP
  1323. X.I "Refile button"
  1324. X.LP
  1325. XA click pops up a dialog box to ask you into which folder you
  1326. Xwish to refile the mail.
  1327. XA shift-click will refile the mail to the same folder as last
  1328. Xtime.
  1329. XA control-click will refile the mail to the
  1330. Xpreviously-visited folder.
  1331. X.LP
  1332. X.I "Comp button"
  1333. X.LP
  1334. XA click composes a new message.
  1335. XA shift-click prompts you for arguments to give to comp.
  1336. X.LP
  1337. X.I "Repl button"
  1338. X.LP
  1339. XA click replies to the current message.
  1340. XA shift-click prompts you for arguments to give to repl.
  1341. X.LP
  1342. X.I "Forw button"
  1343. X.LP
  1344. XA click forwards the current message.
  1345. XA shift-click prompts you for additional arguments to give to
  1346. Xforw
  1347. X(forward additional messages,
  1348. Xfor example).
  1349. X.LP
  1350. X.I "Misc message menu"
  1351. X.LP
  1352. XHold down the right mouse button to open the menu for
  1353. Xselections.
  1354. X.LP
  1355. X.B "Rescan"
  1356. XCauses
  1357. X.I vmail
  1358. Xto refresh its scan listing to match what is really in the
  1359. Xcurrent MH mail folder.
  1360. X.LP
  1361. X.B "Edit"
  1362. XRuns your favorite editor on the current message.
  1363. X.LP
  1364. X.B "Burst"
  1365. XBursts the current message.
  1366. XIf the current message is a digest or contains forwarded
  1367. Xmail,
  1368. Xthe individual internal messages are split out and placed at
  1369. Xthe end of your mail folder.
  1370. XUses the MH
  1371. X.I burst
  1372. Xprogram.
  1373. X.LP
  1374. X.B "Burst..."
  1375. XPrompts you for arguments to pass to burst.
  1376. X.LP
  1377. X.B "Dist"
  1378. XDists
  1379. X(resends)
  1380. Xthe current message.
  1381. XIf a message was sent to you that you wish to send on to
  1382. Xadditional recipients,
  1383. Xwithout including it as a forwarded message,
  1384. Xthis menu item is for you.
  1385. XUses the MH
  1386. X.I dist
  1387. Xprogram.
  1388. X.LP
  1389. X.B "Dist..."
  1390. XPrompts you for arguments to pass to dist.
  1391. X.LP
  1392. X.I "Search button"
  1393. X.LP
  1394. XA click repeats the last
  1395. X(forward or backward)
  1396. Xsearch on the current folder's scan listing.
  1397. XA shift-click prompts you for a string to search for,
  1398. Xthen performs the search,
  1399. Xforward.
  1400. XA control-click prompts you for a string to search for,
  1401. Xthen performs the search,
  1402. Xbackwards.
  1403. X.LP
  1404. X.I "New Folder button"
  1405. X.LP
  1406. XA click prompts you for a new folder to activate and visit.
  1407. XA shift-click sends you back to the previously-visted folder.
  1408. X.LP
  1409. X.I "Misc folder menu"
  1410. X.LP
  1411. XHold down the right mouse button to open the menu for
  1412. Xselections.
  1413. X.LP
  1414. X.B "List All"
  1415. Xlists all the folders
  1416. X.I vmail
  1417. Xknows about,
  1418. Xand whether they are active or not.
  1419. XIf they are active,
  1420. Xit lists how many messages are in the folder.
  1421. X.LP
  1422. X.B "Pack"
  1423. XRenumbers the messages in the current folder so there are no
  1424. Xmessage number gaps.
  1425. X.LP
  1426. X.B "Sort"
  1427. XSorts all messages in the current folder by date,
  1428. Xthen rescans the mail folder.
  1429. XUses the MH
  1430. X.I sortm
  1431. Xprogram.
  1432. X.LP
  1433. X.B "Sort..."
  1434. XLike
  1435. X.B Sort
  1436. Xabove,
  1437. Xbut allows you to specify options to pass to sortm.
  1438. X.LP
  1439. X.B "Inactivate"
  1440. XRemoves the current folder from the active list of folders.
  1441. XIf other folders were active
  1442. X(from using the New Folder button),
  1443. Xyou will go to the alternate folder;
  1444. Xotherwise,
  1445. X.I vmailtool
  1446. Xwill exit.
  1447. X.LP
  1448. XNote that as with any
  1449. X.I tooltool
  1450. Xapplication,
  1451. Xif you hold down the right mouse button while the pointer is
  1452. Xover one of the
  1453. X"buttons",
  1454. X.I vmailtool
  1455. Xwill list all the different functions of that button,
  1456. Xand what shift-key is used to invoke that function:
  1457. X.B S
  1458. Xfor Shift,
  1459. X.B C
  1460. Xfor Control,
  1461. Xand
  1462. X.B M
  1463. Xfor Meta.
  1464. XOr,
  1465. Xif you place the mouse over one of the selections so it is
  1466. Xhighlighted,
  1467. Xand release the right mouse button,
  1468. Xthat selection will be run.
  1469. X.SH OPTIONS
  1470. X.LP
  1471. XTakes the standard
  1472. X.I vmail
  1473. Xoptions.
  1474. XBeware of using
  1475. X-ans,
  1476. X-burst,
  1477. X-comp,
  1478. X-dist,
  1479. X-forw,
  1480. Xand
  1481. X-sort,
  1482. Xas these will mess up the repl,
  1483. Xburst,
  1484. Xcomp,
  1485. Xdist,
  1486. Xforw,
  1487. Xand sort functions.
  1488. X.SH ENVIRONMENT
  1489. X.SP \fINEWMAILCMD\fR
  1490. XString containing a shell command to run everytime new mail
  1491. Xarrives.
  1492. X.DS
  1493. XNEWMAILCMD="cat soundfile > /dev/audio"
  1494. X.DE
  1495. X.EP
  1496. X.SP \fIPRINTER\fR
  1497. XThe printer of choice for the print function of the show
  1498. Xbutton.
  1499. XThe default printer is
  1500. X"lp".
  1501. XTo select
  1502. X"lprn"
  1503. Xas the default,
  1504. Xfor example:
  1505. X.DS
  1506. XPRINTER="lprn"
  1507. X.DE
  1508. X.EP
  1509. X.SP "\fIMAILPATH, MAIL, USER\fR"
  1510. XWhere to find the user's mailbox.
  1511. XFirst choice is
  1512. X.I MAILPATH
  1513. X(see
  1514. X.I ksh(1)),
  1515. Xthen
  1516. X.I MAIL,
  1517. Xthen
  1518. X.I /usr/spool/mail/$USER.
  1519. X.EP
  1520. X.SP "\fIMAILCHECK\fR"
  1521. XInterval in seconds to wait between checking for mail.
  1522. XThe default is 60 seconds.
  1523. X.EP
  1524. X.SP "\fIMAILICON\fR"
  1525. XPathname of full-size sunview icon file to use to indicate
  1526. Xthat the user's system maildrop has mail in it.
  1527. X.EP
  1528. X.SP "\fINOMAILICON\fR"
  1529. XPathname of full-size sunview icon file to use to indicate
  1530. Xthat the user's system maildrop is empty.
  1531. X.EP
  1532. X.SP "\fIBOLD_FONT\fR"
  1533. XPathname of font file to use for the bold-face font.
  1534. X.EP
  1535. X.SH FILES
  1536. X.SP \fI/usr/include/images/mail.icon\fR
  1537. XDefault
  1538. X.I MAILICON.
  1539. X.EP
  1540. X.SP \fI/usr/include/images/nomail.icon\fR
  1541. XDefault
  1542. X.I NOMAILICON.
  1543. X.EP
  1544. X.SP \fI/usr/lib/fonts/fixedwidthfonts/screen.b.14\fR
  1545. XDefault
  1546. X.I BOLD_FONT.
  1547. X.EP
  1548. X.SP \fI/usr/public/bin/vmailicon\fR
  1549. XShell script to set the window icon associated
  1550. Xwith /dev/tty.  This script attempts to outsmart the
  1551. Xwindow lock race condition bug by firing off
  1552. X"echo" and then killing it.
  1553. X.EP
  1554. X.SH SEE ALSO
  1555. Xvmail(1),
  1556. Xmh(1),
  1557. Xinc(1),
  1558. Xksh(1),
  1559. Xtooltool(1).
  1560. X.SH AUTHOR
  1561. XJames T.
  1562. XPerkins
  1563. X(jamesp@metolius.wr.tek.com),
  1564. XMarch 1990.
  1565. XVersion 1.4,
  1566. X20 September 1990.
  1567. X.SH DIAGNOSTICS
  1568. X.SP "vmailicon: nnnn Killed"
  1569. XThis indicates that
  1570. X.I vmailicon
  1571. Xcouldn't set the window icon
  1572. X(probably to raise or lower the flag),
  1573. Xand is retrying.
  1574. X.EP
  1575. X.SP "vmailicon: icon not set after X tries"
  1576. XIndicates that
  1577. X.I vmailicon
  1578. Xcouldn't set the window icon after repeated attempts.
  1579. XThe mailbox flag on the icon will not reflect reality
  1580. Xuntil it is able to.
  1581. X.EP
  1582. X.SP "vmailtool: vmailtool and 'stty tostop' are incompatible. See the man page."
  1583. X.I Vmailtool
  1584. Xdoes not run correctly if you have the
  1585. X.I tostop
  1586. Xfunction of the tty driver engaged.
  1587. XCheck your
  1588. X.I .profile
  1589. Xand
  1590. X.I .login
  1591. Xto see if
  1592. X.I tostop
  1593. Xis turned on there.
  1594. XYou will probably want to edit these occurances to read
  1595. X.I \fB\-\fPtostop
  1596. Xinstead,
  1597. Xthen log out and back in again,
  1598. Xto reset your tty driver to the proper mode permanently.
  1599. X.EP
  1600. X.SH BUGS
  1601. X.LP
  1602. XEditor sessions invoked when you compose,
  1603. Xedit,
  1604. Xor reply to mail,
  1605. Xwill hang if a suspend signal is sent to the process via ^Z.
  1606. X.LP
  1607. XOne cannot add functions not already supported by
  1608. X.I vmail.
  1609. X.LP
  1610. XBecause tooltool scripts are very loosely coupled to the
  1611. Xapplication running underneath them,
  1612. Xit is not easy,
  1613. Xor possible,
  1614. Xto change the set of buttons to more accurately reflect the
  1615. Xcurrent mode of operation
  1616. X("show"
  1617. Xmode,
  1618. X"edit"
  1619. Xmode,
  1620. X"scan"
  1621. Xmode,
  1622. Xfolder selection mode,
  1623. Xetc).
  1624. X.LP
  1625. X.I Vmail 
  1626. Xwill immediately exit if there is no mail in your
  1627. X"inbox"
  1628. Xfolder.
  1629. XSimilarly,
  1630. X.I vmail
  1631. Xwill exit if you have inactivated the last active folder,
  1632. Xor if you rescan the last active folder,
  1633. Xwhen it has just been emptied of messages.
  1634. X.LP
  1635. X.I Vmail
  1636. Xwill get confused if you run MH commands that change the
  1637. Xcontents of the current folder in another Sunview window.
  1638. XTo resync
  1639. X.I vmail
  1640. Xwith the contents of the MH folder,
  1641. Xuse the
  1642. X.B rescan
  1643. Xfunction of the
  1644. X.I "Misc folder menu."
  1645. X.LP
  1646. X.I Vmail
  1647. Xis designed to flush type-ahead by default.
  1648. XSometimes when you press a button,
  1649. X.I vmailtool
  1650. Xwill emit a stream of characters so fast that
  1651. X.I vmail
  1652. Xflushes the first one or two,
  1653. Xleading to unpredictable
  1654. X.I vmail
  1655. Xbehavior.
  1656. XMost people don't experience this behavior,
  1657. Xbut if it happens to you,
  1658. Xadd a line of the form:
  1659. X.sp
  1660. X.DS
  1661. X\fCvmail: -flush\fP
  1662. X.DE
  1663. X.LP
  1664. XTo your
  1665. X.B .mh-profile.
  1666. END_OF_vmailtool.1
  1667. if test 9888 -ne `wc -c <vmailtool.1`; then
  1668.     echo shar: \"vmailtool.1\" unpacked with wrong size!
  1669. fi
  1670. # end of overwriting check
  1671. fi
  1672. echo shar: End of archive 1 \(of 1\).
  1673. cp /dev/null ark1isdone
  1674. MISSING=""
  1675. for I in 1 ; do
  1676.     if test ! -f ark${I}isdone ; then
  1677.     MISSING="${MISSING} ${I}"
  1678.     fi
  1679. done
  1680. if test "${MISSING}" = "" ; then
  1681.     echo You have unpacked all 1 archives.
  1682.     rm -f ark[1-9]isdone
  1683. else
  1684.     echo You still need to unpack the following archives:
  1685.     echo "        " ${MISSING}
  1686. fi
  1687. ##  End of shell archive.
  1688. exit 0
  1689.